<html>
<head>
<title>duetopia - Documentation - OpenSearch</title>
</head>
<body>

<h1>duetopia</h1>

<h2>Configuration</h2>

<p>The <code>config</code> subdirectory contains configuration for the registry app. Copy the whole thing to a working directory.

<blockquote><code>config/app/</code></blockquote>

In here you'll find sample configuration for a Django application. <b>Edit this file:</b>

<blockquote><code>config/app/settings.py</code></blockquote> 

Here you'll need to change
<ul>
<li>The database hostname and port (if not on the same host as the main app)</li>
<li>The database username and password</li>
</ul>
Django looks in your environment to find out where it should be reading its settings from. Set the following environment variable for yourself or for your webserver:

<blockquote><code>~/config$ export DJANGO_SETTINGS_MODULE=app.settings</code></blockquote>

Note that the config package does not need to be called 'app', you can rename it to anything more fitting to your installation.

Test your configuration by running the simple development webserver that comes with Django - invoke it like this: 

<blockquote><code>~/config$ python manage.py runserver</code></blockquote>

If all is well you will see a message similar to this one:
<pre>
Validating models...
0 errors found

Django version 1.0-alpha-SVN-unknown, using settings 'esa.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
</pre> 

If you see errors at this stage:

<ul>
<li>Check that the database username and password are correct in settings.py</li>
<li>Check that the database user has correct permissions (see <a href="installation.html#postgis">notes on PostGIS installation</a> for reference)</li>
<li>Make sure that you have the database tables installed correctly - run <code>syncdb</code> and loaded the redland tables - see <a href="installation.html#">installation</a>)</li>
<li>Make sure that the webserver can see the duetopia python modules - if duetopia is not installed in place where python will see it systemwide, PYTHONPATH should be set to the output of <code>duetopia-devel -p</code></li>

Test your installation by requesting an OpenSearch description for datasets:

<blockquote><code>http://127.0.0.1:8000/duetopia/register/dataset/description/</code></blockquote>


</ul>
</body>
</html>

